-
Notifications
You must be signed in to change notification settings - Fork 0
Comments
Conversation
src/main/java/Calc.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если есть вопросы - всегда можно спросить у куратора.
Но комментарии лучше не пушить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это для себя было , на случай если где то поломается.Спасибо!
src/main/java/FormRub.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Совет на будущее: Если поставить курсор на switch, то можно увидеть фонарик желтый. Он подскажет улучшения кода
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут два момента :
- Хотелось\показалось что Swich тут подходит.
- при изменении выдает ошибки которые я не совсем понимаю как править.
изображение_2023年04月19日_080705750
src/main/java/Gests.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Слишком много пустых строк, лучше не стоит так делать
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Принято убираю , в будущем постараюсь не оставлять.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если предполагалось, что название класса переводится как "Гость", то тут опечатка
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да нет , я пока писал неслолько раз создавал похожие классы.
Крутил разные куски кода , в итоге что бы не путаться в блокноте получилось так.
Понимаю, буду внимательнее.
src/main/java/Gests.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И тут опечатка (см коммент выше)
src/main/java/Gests.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем делать возвращаемый тип у метода int, если ты его не используешь? Для таких целей есть void
image
src/main/java/Main.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут тоже многовато строк
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Названия productName вполне достаточно для понимания зачем оно нужно
src/main/java/FormRub.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Критическое замечание
Неверно выводится окончание слова рубль
image
... "лампочки" (больше желтым не подсвечивает). Незнаю можно ли делать commit после отправки ссылки на Практикум. Риск дело благородное.))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как совет, ты можешь парой строчек выше завести переменную типа
int lastDigit = (int) (Calc.finalCost % 10) и ее подставлять во все проверки твоих условий, а то сейчас получается, что ты считаешь одно и то же 4 раза.
Это называется boilerplate code (код, который повторяется в нескольких местах). Очень легко так ошибиться
Uh oh!
There was an error while loading. Please reload this page.
4 дня ужаса
безнадеги
5-6 удалений всего и вся
и этот "монстр франкенштейна" ~ "готов".
Сдаюсь.
С богом.)))
Забыл в FormRub сделать 2ой метод на склонение слова Рубль.